import { get, post } from '@/utils/request'

const BASE_URL = window.baseUrl.action
const MLK_URL = window.baseUrl.mlk

//  字典-获取字典信息
export function getDictList(query) {
  return get(MLK_URL + '/dictItems/listByType/' + query)
}
// 分页查询
export function queryPageList(query) {
  return get(BASE_URL + '/AsetsSelfReport/pageList', query)
}
// 删除
export function deleteReport(query) {
  return post(BASE_URL + '/AsetsSelfReport/delete?ids=' + query)
}
// 报告详情
export function reportDetail(query) {
  return get(BASE_URL + '/AsetsSelfReport/detail?id=' + query)
}
// 判定
export function reportJudge(data) {
  return post(BASE_URL + '/AsetsSelfReport/judge', data)
}
// 新增配置
export function addConfig(query) {
  return post(BASE_URL + '/assersSelfConfig/add', query)
}
// 生成报告（手动生成调用）
export function createReport(query) {
  return post(BASE_URL + '/AsetsSelfReport/generate', query)
}
// 预览、下载报告
export function download(query) {
  return post(BASE_URL + '/report/download', query)
}

// 新增任务（新增报告自动生成调用）
export function createReportAuto(query) {
  return post(BASE_URL + '/assersSelfConfig/add', query)
}
// 更新任务
export function updateReport(query) {
  return post(BASE_URL + '/assersSelfConfig/update', query)
}
// 删除
export function deleteConfig(query) {
  return post(BASE_URL + '/assersSelfConfig/delete?id=' + query)
}
// 根据id 查询
export function queryReport(query) {
  return get(BASE_URL + '/assersSelfConfig/get', query)
}
